import java.util.Comparator;

public class GameEquipmentAttackPowerComparator
    implements Comparator<GameEquipment> {
    public int compare(GameEquipment g1,GameEquipment g2){
        int attackPower1 = g1.getAttackPower();
        int attackPower2 = g2.getAttackPower();

        if (attackPower1 < attackPower2){
            return -1;
        } else if (attackPower1 == attackPower2) {
            return 0;
        }else {
            return 1;
        }
    }
}
